<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>社区团购</title>
    <script src="js/axios.min.js"></script>
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/vue.js"></script>
    <script src="layui/layui.js"></script>
    <script src="js/vue-router.js"></script>
    <!--    主要替换的地方就是css和最下面的js文件-->
    <link rel="stylesheet" href="layui/css/layui.css"/>
    <link rel="stylesheet" href="css/user.css"/>
    <link rel="stylesheet" href="css/goods_list_item.css"/>
</head>
<body>
<div id="app">
    <div class="layui-container">
        <!--顶部导航栏-->
        <div class="layui-row head-nav">
            <div class="layui-col-md1">
                <img src="images/wopinla-logo.jpg" height="80px">
            </div>
            <div class="layui-col-md1" @click="food">
                生鲜
            </div>
            <div class="layui-col-md1" @click="iphone">
                数码产品
            </div>
            <div class="layui-col-md1" @click="clothes">
                服装
            </div>
            <div class="layui-col-md1" @click="shoes">
                鞋包
            </div>
            <div class="layui-col-md1" @click="typegood">
                首饰
            </div>
            <div class="layui-col-md1" @click="snacks">
                零食
            </div>
            <div class="layui-col-md3">
                <div class="layui-form-item" style="margin-bottom: 0px;margin-top: 21px; ">
                    <div class="layui-input-block" style="margin-left: 0;">
                        <div style="float: left">
                            <input type="text"  placeholder="你在找什么" autocomplete="off" class="layui-input" v-model="goodname">
                        </div>
                        <div style="float: left;height: 38px;line-height: 38px;padding-left: 5px;" @click="findGoods">
                            <i class="layui-icon layui-icon-search" style="font-weight: 700"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row head-nav">
            <div class="layui-col-md1 nav" @click="toCart">
                <i class="layui-icon layui-icon-cart" style="font-size: 14px;font-weight: 700 "></i> 购物车
            </div>
            <div v-if="userid == ''" class="layui-col-md2" >
                    <a href="index.html">登录</a>
            </div>
            <div v-else>
                <div class="layui-col-md2" >
                    <a @click="personinfo">个人信息</a>
                </div>
                <div class="layui-col-md2" >
                    <a @click="quit">注销</a>
                </div>
            </div>

        </div>
    </div>
    <div style="margin-top: 30px">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">商品品牌</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="请输入商品品牌" autocomplete="off" class="layui-input" v-model="goodbrand">
                    </div>
<!--                    <h3>{{goodbrand}}</h3>-->
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">价格</label>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="price_min" placeholder="￥" autocomplete="off" class="layui-input" v-model="price_min">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 100px;">
                        <input type="text" name="price_max" placeholder="￥" autocomplete="off" class="layui-input" v-model="price_max">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">商品种类</label>
                    <div class="layui-input-block">
                        <select   id="good-type">
                            <option disabled value=""></option>
                            <option v-for="type in typelist" v-bind:value="type.name">{{type.name}}</option>
                        </select>
                        <h3>{{good_type}}</h3>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-block">
                        <div class="layui-btn"  @click="screen">查询</div>
                        <button type="reset" class="layui-btn layui-btn-primary" @click="reset">重置</button>
                    </div>
                </div>
            </div>
        </form>
    </div>



    <div class="layui-container">
        <div class="layui-row" >
            <div class="layui-col-md3 goodsItem" v-for="goods in goodslist">
                <div v-if="goods.avatarUrl=='/'">
                    <img src="images/wopinla-logo.jpg" alt="" class="goodsImage" width="285px" height="300px"  @click="gooddetail(goods.sid,goods.eid)"/>
                </div>
                <div v-else>
                    <img v-bind:src="goods.avatarUrl" alt="" class="goodsImage" width="285px" height="300px"  @click="gooddetail(goods.sid,goods.eid)"/>
                </div>

                <h2 class="title" style="color: #111111;">{{goods.name}}</h2>
                <div class="info">
                    <p class="price">{{goods.price}}
                        <span class="now">{{goods.price}}</span>
                        <span class="old">{{goods.price}}</span>
                    </p>
                    <p class="sell">
                        <span>热卖</span>
                        <span>已售{{goods.salesnum}}</span>
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="js/searchgoods.js"></script>
</body>
</html>
